#ifndef PAGETIMESET_H
#define PAGETIMESET_H

#include <QWidget>
#include <QKeyEvent>
#include <QEvent>
#include <QLineEdit>
#include <QTimer>
#include "slimnumkeyboard.h"
#include "globalconfig.h"

namespace Ui {
class PageTimeSet;
}

class PageTimeSet : public QWidget
{
    Q_OBJECT

public:
    explicit PageTimeSet(QWidget *parent = nullptr);
    ~PageTimeSet();
    void setPageActive(bool xActive);
    uint16_t getSetYear();
    uint8_t getSetMonth();
    uint8_t getSetDay();
    uint8_t getSetHour();
    uint8_t getSetMin();
    uint8_t getSetSecond();
protected:
     bool eventFilter(QObject *obj, QEvent *event);
signals:
    void returnToMaintMenu();
    void signal_TimeSetValid(bool);
private slots:
    void input_slot(int);
    void backspace_slot();
    void cancel_slot();
    void on_Btn_Return_clicked();
    void on_Btn_Confirm_clicked();

private:
    Ui::PageTimeSet *ui;
private:
    SlimNumKeyBoard *m_pKeyBoard;
    QList<QLineEdit*> inputlist;
    QLineEdit *m_pFocusLinedit;
};

#endif // PAGETIMESET_H
